home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / hack / 3_1 / sys / vms / makefile.top < prev    next >
Encoding:
Makefile  |  1993-01-25  |  4.2 KB  |  140 lines

  1. #    NetHack Makefile (VMS) - top level for making & installing everything.
  2. #    SCCS Id: @(#)Makefile.top    3.1    93/01/06
  3.  
  4. #  Copy this file to <top>Makefile.; edit the appropriate values for
  5. #  GAMEDIR ("playground" location) and GAMEOWNER (UIC or identifier
  6. #  for the owner of playground files).
  7.  
  8. #    usage:    mms all,install
  9.  
  10. MAKE    = mms
  11. CD    = set default
  12. ECHO    = write sys$output
  13. EXEC    = @
  14. NOOP    = !            # don't do anything
  15. TOUCH    = set file/truncate    # multiple files per $(TOUCH), but no creation
  16. # support directories, relative to 'top'
  17. DAT = [.dat]
  18. DOC = [.doc]
  19. SRC = [.src]
  20. TOP = [-]    # relative to the others
  21. UTL = [.util]
  22. VMS = [.sys.vms]
  23.  
  24. GAMEDIR =            # defaults to [.play]
  25. GAMEOWNER =            # defaults to installer's UIC
  26. # these are the distributed values in [.include]vmsconf.h
  27. #GAMEDIR = DISK$USERS:[GAMES.NETHACK.3-1-0.PLAY]
  28. #GAMEOWNER = NHWIZARD
  29.  
  30. # just about everything, except installation
  31. all :    program utilities data documentation
  32.       @ $(ECHO) "all code and data is now up to date."
  33.  
  34. program :
  35.     $(CD) $(SRC)
  36.     $(MAKE)$(MAKEFLAGS) all
  37.       @ $(CD) $(TOP)
  38. utilities :
  39.     $(CD) $(UTL)
  40.     $(MAKE)$(MAKEFLAGS) all
  41.       @ $(CD) $(TOP)
  42. data :
  43.     $(CD) $(DAT)
  44.     $(MAKE)$(MAKEFLAGS) all
  45.       @ $(CD) $(TOP)
  46. documentation :
  47.     $(CD) $(DOC)
  48.     $(MAKE)$(MAKEFLAGS) all
  49.       @ $(CD) $(TOP)
  50.  
  51. install :    make_directories create_writeable_files update
  52.       @ $(ECHO) "installation is now complete."
  53.  
  54. # assume there're no active games in progress
  55. update    :    place_readonly_files place_executable place_vms_support
  56.       @ open/Write f tmp-update.com;
  57.       @ write f "$ set noon"
  58.       @ write f "$ if p1.eqs."""" then  p1 = f$trnlnm(""HACKDIR"")"
  59.       @ write f "$ if p1.eqs."""" then  p1 = ""[.play]"""
  60.       @ write f "$ old_default = f$environ(""DEFAULT"")"
  61.       @ write f "$ set default 'p1'"
  62.       @ write f\
  63.  "$ if f$search(""*.*;-2"").nes."""" then  set file/prot=(s:rwed,o:rwed) *.*;-2"
  64.       @ write f\
  65.  "$ if f$search(""*.*;-1"").nes."""" then  set file/prot=(s:rwed,o:rwed) *.*;-1"
  66.       @ write f "$ if f$search(""*.*;-1"").nes."""" then  purge"
  67.       @ write f "$ if f$search(""bones*.*"").nes."""" then  $(TOUCH) bones*.*"
  68.       @ write f "$ if f$search(""[.save]*"").nes."""" then  $(TOUCH) [.save]*"
  69.       @ write f "$ set default 'old_default'"
  70.       @ write f "$ exit"
  71.       @ close f
  72.       - $(EXEC)tmp-update.com; $(GAMEDIR)  !purge old version, touch save files
  73.       @ delete tmp-update.com;
  74.       @ $(ECHO) "playground files updated."
  75.  
  76. Guidebook :
  77.     $(CD) $(DOC)
  78.     $(MAKE)$(MAKEFLAGS) Guidebook
  79.       @ $(CD) $(TOP)
  80. manpages :
  81.     $(CD) $(DOC)
  82.     $(MAKE)$(MAKEFLAGS) manpages
  83.       @ $(CD) $(TOP)
  84.  
  85. make_directories :
  86.     $(EXEC)$(VMS)install.com "$(GAMEDIR)" "$(GAMEOWNER)" directories
  87.  
  88. create_writeable_files :
  89.     $(EXEC)$(VMS)install.com "$(GAMEDIR)" "$(GAMEOWNER)" writeable_files
  90.  
  91. place_readonly_files :
  92.     $(EXEC)$(VMS)install.com "$(GAMEDIR)" "$(GAMEOWNER)" readonly_files
  93.  
  94. place_executable :
  95.     $(EXEC)$(VMS)install.com "$(GAMEDIR)" "$(GAMEOWNER)" executable
  96.  
  97. place_vms_support :
  98.     $(EXEC)$(VMS)install.com "$(GAMEDIR)" "$(GAMEOWNER)" termcap
  99.     $(EXEC)$(VMS)install.com "$(GAMEDIR)" "$(GAMEOWNER)" procedure
  100.     $(EXEC)$(VMS)install.com "$(GAMEDIR)" "$(GAMEOWNER)" documentation
  101.  
  102.  
  103. # 'make no_tools' should be done first if you don't have the appropriate
  104. # tools to process the parser and scanner for the special level and
  105. # dungeon compilers; doing so will copy distributed, pre-processed files
  106. # from [.sys.share] to [.util].  If you _do_ have the tools, be sure to
  107. # edit [.util]Makefile so that it uses the right ones.
  108. no_tools :
  109.     $(CD) $(UTL)
  110.     $(MAKE)$(MAKEFLAGS) no_yacc
  111.     $(MAKE)$(MAKEFLAGS) no_lex
  112.       @ $(CD) $(TOP)
  113.  
  114.  
  115. # 'make clean' removes all the .obj files, but leaves around all the executables
  116. # and compiled data files.
  117. clean :
  118.     $(CD) $(SRC)
  119.       - $(MAKE)$(MAKEFLAGS) clean
  120.       @ $(CD) $(TOP)
  121.     $(CD) $(UTL)
  122.       - $(MAKE)$(MAKEFLAGS) clean
  123.       @ $(CD) $(TOP)
  124.  
  125. # 'make spotless' returns the source tree to near-distribution condition.
  126. # it removes .obj files, executables, and compiled data files.
  127. spotless :
  128.     $(CD) $(SRC)
  129.       - $(MAKE)$(MAKEFLAGS) spotless
  130.       @ $(CD) $(TOP)
  131.     $(CD) $(UTL)
  132.       - $(MAKE)$(MAKEFLAGS) spotless
  133.       @ $(CD) $(TOP)
  134.     $(CD) $(DAT)
  135.       - $(MAKE)$(MAKEFLAGS) spotless
  136.       @ $(CD) $(TOP)
  137.     $(CD) $(DOC)
  138.       - $(MAKE)$(MAKEFLAGS) spotless
  139.       @ $(CD) $(TOP)
  140.